package org.example.alig;

public class Alig4 {
    public static void main(String[] args) {
        String[] names = {"A", "B", "C", "D"};
        int N = 49;
        int i = 0;
        int basic = names.length;
        while (N > basic) {
            N = N - basic;
            basic *= 2;
            i++;
        }
        System.out.println(Math.ceil(N / Math.pow(2, i)));
        int y = (int) Math.ceil(N / Math.pow(2, i));
        System.out.println(names[y - 1]);
    }
}
